package com.coffee;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@MapperScan(value = {"com.coffee"})
@SpringBootApplication
@EnableAspectJAutoProxy(exposeProxy = true)
public class Application {
    private static final Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {

        ConfigurableApplicationContext applicationContext = SpringApplication.run(Application.class, args);
        String property = applicationContext.getEnvironment().getProperty("spring.profiles.active");

        logger.info("==============启动了=====server==================环境===" + property);
    }
}


